home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / dos / selectoutput.c < prev    next >
C/C++ Source or Header  |  1996-09-12  |  1KB  |  71 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: selectoutput.c,v 1.3 1996/08/13 13:52:51 digulla Exp $
  4.     $Log: selectoutput.c,v $
  5.     Revision 1.3  1996/08/13 13:52:51  digulla
  6.     Replaced <dos/dosextens.h> by "dos_intern.h" or added "dos_intern.h"
  7.     Replaced __AROS_LA by __AROS_LHA
  8.  
  9.     Revision 1.2  1996/08/01 17:40:58  digulla
  10.     Added standard header for all files
  11.  
  12.     Desc:
  13.     Lang: english
  14. */
  15. #include <clib/exec_protos.h>
  16. #include "dos_intern.h"
  17.  
  18. /*****************************************************************************
  19.  
  20.     NAME */
  21.     #include <clib/dos_protos.h>
  22.  
  23.     __AROS_LH1(BPTR, SelectOutput,
  24.  
  25. /*  SYNOPSIS */
  26.     __AROS_LHA(BPTR, fh, D1),
  27.  
  28. /*  LOCATION */
  29.     struct DosLibrary *, DOSBase, 50, Dos)
  30.  
  31. /*  FUNCTION
  32.     Sets the current output stream returned by Output() to a new
  33.     value. Returns the old output stream.
  34.  
  35.     INPUTS
  36.     fh - New output stream.
  37.  
  38.     RESULT
  39.     Old output stream handle.
  40.  
  41.     NOTES
  42.  
  43.     EXAMPLE
  44.  
  45.     BUGS
  46.  
  47.     SEE ALSO
  48.  
  49.     INTERNALS
  50.  
  51.     HISTORY
  52.     29-10-95    digulla automatically created from
  53.                 dos_lib.fd and clib/dos_protos.h
  54.  
  55. *****************************************************************************/
  56. {
  57.     __AROS_FUNC_INIT
  58.     __AROS_BASE_EXT_DECL(struct DosLibrary *,DOSBase)
  59.  
  60.     BPTR old;
  61.  
  62.     /* Get pointer to process structure */
  63.     struct Process *me=(struct Process *)FindTask(NULL);
  64.  
  65.     /* Nothing spectacular */
  66.     old=me->pr_COS;
  67.     me->pr_COS=fh;
  68.     return old;
  69.     __AROS_FUNC_EXIT
  70. } /* SelectOutput */
  71.